package com.ershi.spring.ioc.lifecycle;

import org.springframework.context.Lifecycle;

/**
 * @author 二十
 * @since 2021/10/12 12:14 上午
 * 演示这里的demo需要将这个包下的所有bean注册到xml文件中
 */
public class DemoLifeCycle implements Lifecycle {

	private boolean running =false;
	@Override
	public void start() {
		this.running=true;
		System.out.println("demo one start!");
	}

	@Override
	public void stop() {
		this.running=false;
		System.out.println("demo one stop!");
	}

	@Override
	public boolean isRunning() {
		return running;
	}
}
